package com.kt.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("store_sales")
public class StoreSales {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String storeName;
    private BigDecimal targetSales;
    private BigDecimal actualSales;
    private BigDecimal lastYearSales;
    private Integer stockQuantity;
    private Integer soldQuantity;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    @TableLogic
    private Integer isDeleted;

    // 扩展字段（用于计算结果）
    @TableField(exist = false)
    private String completionRate;  // 完成率
    @TableField(exist = false)
    private String yearOnYear;      // 同比
}